package when3meet.utilities;

import javax.swing.JTextField;

/**
 * Utilities to check input type
 * 
 * @author Xi
 * 
 */

public class InputUtilities {

	public static boolean checkTextFieldInput(JTextField tf) {
		String s = tf.getText();

		if (s.equals("") || s == null) {
			return false;
		}

		return true;
	}

	public static boolean checkIntegerInput(JTextField tf) {

		try {
			Integer.parseInt(tf.getText());
		} catch (Exception e) {
			return false;
		}

		return true;
	}
}
